<style>
    legend {padding-bottom:5px;font-size:14px;font-weight:600;}
    label {font-weight:normal;}
    .form-control{padding:6px 8px;}
    #extend-zone .col-xs-2 {margin-top:10px;padding-right:0;}
    #extend-zone .col-xs-2:nth-child(6n+0) {padding-right:15px;}
</style>

<div class="tab-pane " id="api">
    <div class="row">
        <div class="col-xs-12">
            <form id="add-form"  role="form" data-toggle="validator" method="POST" action="" autocomplete="off">
                <div class="form-group">
                    <div class="row" style="margin-top:10px;">
                        <div class="col-xs-12">
                            <legend>分公司名称</legend>
                            <div class="col-xs-6">
                                <label>分公司名称</label>
                                <input type="text" name="output"  value="{$admin.department_text}" disabled class="form-control" placeholder="分公司名称" />
                            </div>
                            <div class="col-xs-6">
                                <label>业务员名称</label>
                                <input type="text" name="template" disabled  value="{$admin.username}" class="form-control" placeholder="业务员名称" />
                            </div>
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <div class="row ">
                        <div class="col-xs-12">
                            <legend>学校名称</legend>
                            <div class="row">
                                <div class="col-xs-3">
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:;" class="btn btn-success btn-add-school" data-area='["80%","80%"]' title="添加"><i class="fa fa-plus"></i>添加新的学校</a><hr>
                                </div>
                            </div>
                            <div class="col-xs-3">
                                <label>请选择学校</label>
                                <input type="text" name="row[school_id]" data-rule="required" class="form-control selectpage" value="{$row.school_id}" data-source="school/index" data-field="name"  placeholder="请选择学校" />
                            </div>
                            <div class="col-xs-3">
                                <label>学校计划 内/外</label>
                                <select name="row[plan]" data-rule="required" class="form-control">
                                    <option value="" selected>请选择</option>
                                    <option value="1" {$row.plan == 1 ? 'selected' : ''} >计划内</option>
                                    <option value="2" {$row.plan == 2 ? 'selected' : ''}>计划外</option>
                                </select>
                            </div>
                            <div class="col-xs-3">
                                <label>学校分类</label>
                                <select name="row[type]" data-rule="required" class="form-control">
                                    <option value="" selected>请选择</option>
                                    <option value="1" {$row.type == 1 ? 'selected' : ''}>A</option>
                                    <option value="2" {$row.type == 2 ? 'selected' : ''}>B</option>
                                    <option value="3" {$row.type == 3 ? 'selected' : ''}>C</option>
                                </select>
                            </div>
                            <div class="col-xs-3">
                                <label>学校分级</label>
                                <select name="row[level]" data-rule="required" class="form-control">
                                    <option value="" selected>请选择</option>
                                    <option value="1" {$row.level == 1 ? 'selected' : ''}>地级</option>
                                    <option value="2" {$row.level == 2 ? 'selected' : ''}>县级</option>
                                    <option value="3" {$row.level == 3 ? 'selected' : ''}>省会</option>
                                </select>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <div class="row" style="margin-top:10px;">
                        <div class="col-xs-12">
                            <legend>年级</legend>
                            <div class="col-xs-3">
                                <label>年级</label>
                                <select name="row[grade]" data-rule="required" class="form-control">
                                    <option value="初一" {$row.grade == '初一' ? 'selected' : ''}>初一</option>
                                    <option value="初二" {$row.grade == '初二' ? 'selected' : ''}>初二</option>
                                    <option value="初三" {$row.grade == '初三' ? 'selected' : ''}>初三</option>
                                    <option value="高一" {$row.grade == '高一' ? 'selected' : ''}>高一</option>
                                    <option value="高二" {$row.grade == '高二' ? 'selected' : ''}>高二</option>
                                    <option value="高三" {$row.grade == '高三' ? 'selected' : ''}>高三</option>
                                </select>
                            </div>
                            <div class="col-xs-3">
                                <label>总班级数</label>
                                <input type="number" data-rule="required" name="row[general_class]" value="{$row.general_class}" class="form-control" placeholder="总班数" />
                            </div>
                            <div class="col-xs-3">
                                <label>文科班</label>
                                <input type="number" data-rule="required" name="row[liberal_art]" value="{$row.liberal_art}" class="form-control" placeholder="文科班" />
                            </div>
                            <div class="col-xs-3">
                                <label>理科班</label>
                                <input type="number" data-rule="required" name="row[science_class]" value="{$row.science_class}" class="form-control" placeholder="理科班" />
                            </div>

                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <div class="row" style="margin-top:10px;">
                        <div class="col-xs-12">
                            <div class="col-xs-3">
                                <label>年级人数</label>
                                <input type="text" data-rule="required" name="row[number]" value="{$row.number}" class="form-control" placeholder="年级人数" />
                            </div>
                            <div class="col-xs-3"></div>
                            <div class="col-xs-3">
                                <label>文科人数</label>
                                <input type="text" data-rule="required" name="row[writing]" value="{$row.writing}" class="form-control" placeholder="文科人数" />
                            </div>
                            <div class="col-xs-3">
                                <label>理科人数</label>
                                <input type="text" data-rule="required" name="row[reason]" value="{$row.reason}" class="form-control" placeholder="理科人数" />
                            </div>
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <legend>级部</legend>
                    <div class="row" style="margin-top:10px;">
                        <div class="col-xs-12">
                            <div class="col-xs-12">
                                <dl class="fieldlist" data-name="row[teacher]" data-template="teacher">
                                    <dd>
                                        <ins>职务</ins>
                                        <ins>姓名</ins>
                                        <ins>电话</ins>
                                        <ins>送样数量</ins>
                                    </dd>
                                    {foreach name="$teacher" item="vo"}
                                    <dd class="form-inline">
                                        <select name="row[teacher][<%=index%>][subject]" class="form-control" style="width: 110px;">
                                            <option value="年级组长" {$vo.subject === '年级组长' ? 'selected' : ''}>年级组长</option>
                                            <option value="语文备课组长" {$vo.subject === '语文备课组长' ? 'selected' : ''}>语文备课组长</option>
                                            <option value="理数备课组长" {$vo.subject === '理数备课组长' ? 'selected' : ''}>理数备课组长</option>
                                            <option value="文数备课组长" {$vo.subject === '文数备课组长' ? 'selected' : ''}>文数备课组长</option>
                                            <option value="英语备课组长" {$vo.subject === '英语备课组长' ? 'selected' : ''}>英语备课组长</option>
                                            <option value="物理备课组长" {$vo.subject === '物理备课组长' ? 'selected' : ''}>物理备课组长</option>
                                            <option value="化学备课组长" {$vo.subject === '化学备课组长' ? 'selected' : ''}>化学备课组长</option>
                                            <option value="生物备课组长" {$vo.subject === '生物备课组长' ? 'selected' : ''}>生物备课组长</option>
                                            <option value="政治备课组长" {$vo.subject === '政治备课组长' ? 'selected' : ''}>政治备课组长</option>
                                            <option value="历史备课组长" {$vo.subject === '历史备课组长' ? 'selected' : ''}>历史备课组长</option>
                                            <option value="地理备课组长" {$vo.subject === '地理备课组长' ? 'selected' : ''}>地理备课组长</option>
                                            <option value="负责定数老师" {$vo.subject === '负责定数老师' ? 'selected' : ''}>负责定数老师</option>
                                            <option value="其他">其他</option>
                                        </select>
                                        <input type="text" name="row[teacher][{$key+100}][name]" class="form-control" value="{$vo.name}" size="8">
                                        <input type="number" name="row[teacher][{$key+100}][tel]" class="form-control" value="{$vo.tel}" size="18">
                                        <input type="number" name="row[teacher][{$key+100}][number]" class="form-control" value="{$vo.number}" size="10">
                                        <input type="text" name="row[teacher][{$key+100}][id]" class="hidden" value="{$vo.id}" size="15">
                                        <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                                        <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
                                    </dd>
                                    {/foreach}
                                    <dd><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a></dd>
                                    <textarea name="row[teacher]" class="form-control hide" cols="30" rows="5"></textarea>
                                </dl>
                            </div>
                        </div>
                    </div>
                </div>
                <script type="text/html" id="teacher">
                    <dd class="form-inline">
                        <select name="row[teacher][<%=index%>][subject]" class="form-control" style="width: 110px;">
                            <option value="年级组长">年级组长</option>
                            <option value="语文备课组长">语文备课组长</option>
                            <option value="理数备课组长">理数备课组长</option>
                            <option value="文数备课组长">文数备课组长</option>
                            <option value="英语备课组长">英语备课组长</option>
                            <option value="物理备课组长">物理备课组长</option>
                            <option value="化学备课组长">化学备课组长</option>
                            <option value="生物备课组长">生物备课组长</option>
                            <option value="政治备课组长">政治备课组长</option>
                            <option value="历史备课组长">历史备课组长</option>
                            <option value="地理备课组长">地理备课组长</option>
                            <option value="负责定数老师">负责定数老师</option>
                            <option value="其他">其他</option>
                        </select>
                        <input type="text" name="row[teacher][<%=index%>][name]" class="form-control" value="<%=row.val2%>" size="8">
                        <input type="number" name="row[teacher][<%=index%>][tel]" class="form-control" value="<%=row.val3%>" size="18">
                        <input type="number" name="row[teacher][<%=index%>][number]" class="form-control" value="<%=row.val4%>" size="10">
                        <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                        <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
                    </dd>
                </script>
                <div class="form-group">
                    <div class="row" style="margin-top:10px;">
                        <div class="col-xs-12">
                            <legend>一轮教案</legend>
                            <div class="col-xs-12">
                                <dl class="fieldlist" data-name="row[yilunjiaoan]" data-template="yilunjiaoan">
                                    <dd>
                                        <ins>样书科目</ins>
                                        <ins>样书版本</ins>
                                        <ins>样书数量</ins>
                                    </dd>
                                    {foreach name="$samplebook['yiluntidian']" item="vo"}
                                        <dd class="form-inline">
                                            <div class="form-inline" id="{$key+100}_yiluntidian" data-toggle="cxselect" data-selects="first,second">
                                                <select class="first form-control" data-tip="请选择科目" data-rule="required" name="row[yiluntidian][{$key+100}][kemu]" data-url="ajax/category?type=page&amp;pid=5" style="width: 110px;">
                                                    <option value="{$vo.kemu}" selected></option>
                                                </select>
                                                <select class="second form-control" data-rule="required" name="row[yiluntidian][{$key+100}][banben]" data-url="ajax/category" data-query-name="pid" style="width:110px;">
                                                    <option value="{$vo.banben}" selected></option>
                                                </select>
                                                <input type="text"  data-rule="required" name="row[yiluntidian][{$key+100}][number]" class="form-control" value="{$vo.number}" size="10">
                                                <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                                                <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
                                            </div>
                                        </dd>
                                    {/foreach}
                                    <dd><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a></dd>
                                    <textarea name="row[yilunjiaoan]" class="form-control hide" cols="30" rows="5"></textarea>
                                </dl>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <legend>一轮提典</legend>
                            <div class="col-xs-12">
                                <dl class="fieldlist" data-name="row[yiluntidian]" data-template="yiluntidian">
                                    <dd>
                                        <ins>样书科目</ins>
                                        <ins>样书版本</ins>
                                        <ins>样书数量</ins>
                                    </dd>
                                    {foreach name="$samplebook['yilunjiaoan']" item="vo"}
                                    <dd class="form-inline">
                                        <div class="form-inline" id="{$key+100}_yilunjiaoan" data-toggle="cxselect" data-selects="first,second">
                                            <select class="first form-control" data-tip="请选择科目" data-rule="required" name="row[yiluntidian][{$key+100}][kemu]" data-url="ajax/category?type=page&amp;pid=5" style="width: 110px;">
                                                <option value="{$vo.kemu}" selected></option>
                                            </select>
                                            <select class="second form-control" data-rule="required" name="row[yiluntidian][{$key+100}][banben]" data-url="ajax/category" data-query-name="pid" style="width:110px;">
                                                <option value="{$vo.banben}" selected></option>
                                            </select>
                                            <input type="text"  data-rule="required" name="row[yiluntidian][{$key+100}][number]" class="form-control" value="{$vo.number}" size="10">
                                            <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                                            <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
                                        </div>
                                    </dd>
                                    {/foreach}
                                    <dd><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a></dd>
                                    <textarea name="row[yiluntidian]" class="form-control hide" cols="30" rows="5"></textarea>
                                </dl>
                            </div>
                        </div>
                    </div>
                </div>
                <script type="text/html" id="yiluntidian">
                    <dd class="form-inline">
                        <div class="form-inline" id="<%=index%>_yiluntidian" data-toggle="cxselect" data-selects="first,second">
                            <select class="first form-control" data-tip="请选择科目" data-rule="required" name="row[yiluntidian][<%=index%>][kemu]" data-url="ajax/category?type=page&amp;pid=5" style="width: 110px;"></select>
                            <select class="second form-control" data-rule="required" name="row[yiluntidian][<%=index%>][banben]" data-url="ajax/category" data-query-name="pid" style="width:110px;"></select>
                            <input type="text"  data-rule="required" name="row[yiluntidian][<%=index%>][number]" class="form-control" value="<%=row.val3%>" size="10">
                            <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                            <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
                        </div>
                    </dd>
                </script>
                <script type="text/html" id="yilunjiaoan">
                    <dd class="form-inline">
                        <div class="form-inline" id="<%=index%>_yilunjiaoan" data-toggle="cxselect" data-selects="first,second">
                            <select class="first form-control" data-rule="required" name="row[yilunjiaoan][<%=index%>][kemu]" data-url="ajax/category?type=page&amp;pid=5" style="width:110px;"></select>
                            <select class="second form-control" data-rule="required" name="row[yilunjiaoan][<%=index%>][banben]" data-url="ajax/category" data-query-name="pid" style="width:110px;"></select>
                            <input type="text" data-rule="required" name="row[yilunjiaoan][<%=index%>][number]" class="form-control" value="<%=row.val3%>" size="10">
                            <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                            <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
                        </div>
                    </dd>
                </script>
                <hr>
                <div class="form-group">
                    <div class="row" style="margin-top:10px;">
                        <div class="col-xs-12">
                            <legend>附件</legend>
                            <div class="col-xs-4">
                                <label>送样照片</label>
                                {:build_radios('row[phone]', ['1'=>__('后附'), '2'=>__('无')],$row.phone)}
                            </div>
                            <div class="col-xs-4">
                                <label>与老师沟通信息截屏</label>
                                {:build_radios('row[screenshots]', ['1'=>__('后附'), '2'=>__('无')],$row.screenshots)}
                            </div>
                            <div class="col-xs-4">
                                <label>录音</label>
                                {:build_radios('row[sound]', ['1'=>__('后附'), '2'=>__('无')],$row.sound)}
                            </div>
                        </div>
                    </div>
                </div>
                <hr>
                <div class="form-group">
                    <div class="row" style="margin-top:10px;">
                        <div class="col-xs-12">
                            <legend>赠品</legend>
                            <div class="col-xs-6">
                                <label>移动电源</label>
                                <input type="number" name="row[portable_source]" value="{$row.portable_source}" class="form-control" placeholder="移动电源" />
                            </div>
                            <div class="col-xs-6">
                                <label>其他赠品</label>
                                <textarea name="row[other]" class="form-control" rel="result" rows="2" placeholder="请填写其它赠品详情" >{$row.other}</textarea>
                            </div>
                            <div class="col-xs-6">
                                <label>U盘</label>
                                <dl class="fieldlist" data-name="row[usb_drive]">
                                    <dd>
                                        <ins>内存，大小</ins>
                                        <ins>数量</ins>
                                    </dd>
                                    <dd><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a></dd>
                                    <textarea name="row[usb_drive]" class="form-control hide" cols="30" rows="5">{$row.usb_drive}</textarea>
                                </dl>
                            </div>
                            <div class="col-xs-6">
                                <label>购物卡</label>
                                <dl class="fieldlist" data-name="row[shopping_card]" >
                                    <dd>
                                        <ins>面值</ins>
                                        <ins>数量</ins>
                                    </dd>
                                    <dd><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a></dd>
                                    <textarea name="row[shopping_card]" class="form-control hide" cols="30" rows="5">{$row.shopping_card}</textarea>
                                </dl>
                            </div>
                            <div class="col-xs-6">
                                <label>充值卡</label>
                                <dl class="fieldlist" data-name="row[rechargeable_card]" >
                                    <dd>
                                        <ins>面值</ins>
                                        <ins>数量</ins>
                                    </dd>
                                    <dd><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a></dd>
                                    <textarea name="row[rechargeable_card]" class="form-control hide" cols="30" rows="5">{$row.rechargeable_card}</textarea>
                                </dl>
                            </div>
                        </div>
                        <div class="col-xs-12" style="margin-top:10px;">
                            <legend>样书、订书时间</legend>
                            <div class="col-xs-6">
                                <label>发样书时间</label>
                                <input type="text" name="row[sample_time]" value="{$row.sample_time}" class="form-control datetimepicker" placeholder="发样书时间" data-date-format="YYYY-MM-DD"  />
                            </div>
                            <div class="col-xs-6">
                                <label>各科订书时间</label>
                                <textarea class="form-control" name="row[order_time]" rel="result" rows="2" placeholder="各科订书时间" >{$row.order_time}</textarea>
                            </div>
                        </div>
                        <div class="col-xs-12" style="margin-top:10px;">
                            <legend>负责人，合跑人</legend>
                            <div class="col-xs-6">
                                <label>合跑人</label>
                                <input type="text" name="row[userids]"  value="{$row.userids}" class="form-control selectpage" data-multiple="true" data-source="auth/admin/selectDepartment" data-params='{"custom[department]":"{$admin.department}"}' data-primary-key="a.userid" data-field="username"  placeholder="合跑人" />
                            </div>
                            <div class="col-xs-6">
                                <label>负责人辅助</label>
                                <input type="text" name="row[auxiliary]"  value="{$row.auxiliary}" class="form-control selectpage" data-source="auth/admin/selectDepartment" data-params='{"custom[department]":"{$admin.department}"}' data-field="username" data-primary-key="a.userid" placeholder="负责人辅助" />
                            </div>
                        </div>
                    </div>
                    <div class="row" style="margin-top:20px;">
                        <div class="col-xs-12">
                            <legend>合作书店</legend>
                            <div class="col-xs-12">
                                <dl class="fieldlist" data-name="row[hezuoshudian]" data-template="hezuoshudian">
                                    <dd>
                                        <ins>名称</ins>
                                        <ins>书店老板</ins>
                                        <ins>电话</ins>
                                        <ins>把控度</ins>
                                        <ins>折扣</ins>
                                    </dd>
                                    {foreach name="$bookstore" item="vo"}
                                        {if $vo.status == 1}
                                            <dd class="form-inline">
                                                <input type="text" data-rule="required" name="row[hezuoshudian][{$key+100}][bookstore_name]" class="form-control" value="{$vo.bookstore_name}" size="8">
                                                <input type="text" data-rule="required" name="row[hezuoshudian][{$key+100}][boss]" class="form-control" value="{$vo.boss}" size="10">
                                                <input type="text" data-rule="required" name="row[hezuoshudian][{$key+100}][tel]" class="form-control" value="{$vo.tel}" size="18">
                                                <input type="text" data-rule="required" name="row[hezuoshudian][{$key+100}][control]" class="form-control" value="{$vo.control}" size="10">
                                                <input type="text" data-rule="required" name="row[hezuoshudian][{$key+100}][discount]" class="form-control" value="{$vo.discount}" size="10">
                                                <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                                                <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
                                            </dd>
                                        {/if}
                                    {/foreach}
                                    <dd><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a></dd>
                                    <textarea name="row[hezuoshudian]" class="form-control hide" cols="30" rows="5"></textarea>
                                </dl>
                            </div>
                        </div>
                        <script type="text/html" id="hezuoshudian">
                            <dd class="form-inline">
                                <input type="text" data-rule="required" name="row[hezuoshudian][<%=index%>][bookstore_name]" class="form-control" value="<%=row.val1%>" size="8">
                                <input type="text" data-rule="required" name="row[hezuoshudian][<%=index%>][boss]" class="form-control" value="<%=row.val2%>" size="10">
                                <input type="text" data-rule="required" name="row[hezuoshudian][<%=index%>][tel]" class="form-control" value="<%=row.val3%>" size="18">
                                <input type="text" data-rule="required" name="row[hezuoshudian][<%=index%>][control]" class="form-control" value="<%=row.val4%>" size="10">
                                <input type="text" data-rule="required" name="row[hezuoshudian][<%=index%>][discount]" class="form-control" value="<%=row.val5%>" size="10">
                                <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                                <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
                            </dd>
                        </script>
                        <div class="col-xs-12">
                            <legend>合作直销员</legend>
                            <div class="col-xs-12">
                                <dl class="fieldlist" data-name="row[hezuozhixiaoyuan]" data-template="hezuozhixiaoyuan">
                                    <dd>
                                        <ins>姓名</ins>
                                        <ins>电话</ins>
                                        <ins>把控度</ins>
                                        <ins>折扣</ins>
                                    </dd>
                                    {foreach name="$bookstore" item="vo"}
                                        {if $vo.status == 2}
                                            <dd class="form-inline">
                                                <input type="text" data-rule="required" name="row[hezuozhixiaoyuan][{$key+100}][boss]" class="form-control" value="{$vo.boss}" size="8">
                                                <input type="text" data-rule="required" name="row[hezuozhixiaoyuan][{$key+100}][tel]" class="form-control" value="{$vo.tel}" size="16">
                                                <input type="text" data-rule="required" name="row[hezuozhixiaoyuan][{$key+100}][control]" class="form-control" value="{$vo.control}" size="10">
                                                <input type="text" data-rule="required" name="row[hezuozhixiaoyuan][{$key+100}][discount]" class="form-control" value="{$vo.discount}" size="10">
                                                <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                                                <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
                                            </dd>
                                        {/if}
                                    {/foreach}
                                    <dd><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a></dd>
                                    <textarea name="row[hezuozhixiaoyuan]" class="form-control hide" cols="30" rows="5"></textarea>
                                </dl>
                            </div>
                        </div>
                        <script type="text/html" id="hezuozhixiaoyuan">
                            <dd class="form-inline">
                                <input type="text" data-rule="required" name="row[hezuozhixiaoyuan][<%=index%>][boss]" class="form-control" value="<%=row.val1%>" size="8">
                                <input type="text" data-rule="required" name="row[hezuozhixiaoyuan][<%=index%>][tel]" class="form-control" value="<%=row.val2%>" size="16">
                                <input type="text" data-rule="required" name="row[hezuozhixiaoyuan][<%=index%>][control]" class="form-control" value="<%=row.val3%>" size="10">
                                <input type="text" data-rule="required" name="row[hezuozhixiaoyuan][<%=index%>][discount]" class="form-control" value="<%=row.val4%>" size="10">
                                <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                                <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
                            </dd>
                        </script>
                        <div class="col-xs-12">
                            <legend>各科老师评价汇总</legend>
                            <div class="col-xs-12">
                                <dl class="fieldlist" data-name="row[evaluation_summary]" data-template="evaluation_summary">
                                    <dd>
                                        <ins style="width: 61px;">科目</ins>
                                        <ins style="width: 333px;">一轮提典</ins>
                                        <ins>一轮教案</ins>
                                    </dd>
                                    {foreach name="$row.evaluation_summary" item="vo"}
                                    <dd class="form-inline">
                                        <select name="row[evaluation_summary][{$key+100}][kemu]" class="form-control" style="width:60px;height: 99px">
                                            <option value="语文" {$vo.kemu === '语文' ? 'selected' : ''}>语文</option>
                                            <option value="理数">理数</option>
                                            <option value="文数">文数</option>
                                            <option value="英语">英语</option>
                                            <option value="物理">物理</option>
                                            <option value="化学">化学</option>
                                            <option value="生物">生物</option>
                                            <option value="政治">政治</option>
                                            <option value="历史">历史</option>
                                            <option value="地理">地理</option>
                                            <option value="技术">技术</option>
                                        </select>
                                        <textarea name="row[evaluation_summary][{$key+100}][yiluntidian]" class="form-control" cols="50"  rows="5" size="30">{$vo.yiluntidian}</textarea>
                                        <textarea name="row[evaluation_summary][{$key+100}][yilunjiaoan]" class="form-control" cols="50"  rows="5">{$vo.yilunjiaoan}</textarea>
                                        <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                                        <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
                                    </dd>
                                    {/foreach}
                                    <dd><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a></dd>
                                </dl>
                            </div>
                        </div>
                        <div class="col-xs-12">
                            <legend>学校情况汇总</legend>
                            <div class="col-xs-6">
                                <label>意向品种及学科</label>
                                <textarea class="form-control" rel="result" name="row[disciplines]" rows="5" placeholder="意向品种及学科" >{$row.disciplines}</textarea>
                            </div>
                            <div class="col-xs-6">
                                <label>盯订数的计划</label>
                                <textarea class="form-control" rel="result" name="row[scheduling_of_orders]" rows="5" placeholder="盯订数的计划" >{$row.scheduling_of_orders}</textarea>
                            </div>
                            <div class="col-xs-6">
                                <label>图书会销的计划</label>
                                <textarea class="form-control" rel="result" name="row[plans_for_book_sales]" rows="5" placeholder="图书会销的计划" >{$row.plans_for_book_sales}</textarea>
                            </div>
                            <div class="col-xs-6">
                                <label>负责人意见</label>
                                <textarea class="form-control" rel="result" name="row[responsible_opinions]" rows="5" placeholder="负责人意见" >{$row.responsible_opinions}</textarea>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="form-group layer-footer">
                    <label class="control-label col-xs-12 col-sm-2"></label>
                    <div class="col-xs-12 col-sm-8">
                        <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
                        <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>

<script type="text/html" id="evaluation_summary">
    <dd class="form-inline">
        <select name="row[evaluation_summary][<%=index%>][kemu]" class="form-control" style="width:60px;height: 99px">
            <option value="语文">语文</option>
            <option value="理数">理数</option>
            <option value="文数">文数</option>
            <option value="英语">英语</option>
            <option value="物理">物理</option>
            <option value="化学">化学</option>
            <option value="生物">生物</option>
            <option value="政治">政治</option>
            <option value="历史">历史</option>
            <option value="地理">地理</option>
            <option value="技术">技术</option>
        </select>
        <textarea name="row[evaluation_summary][<%=index%>][yiluntidian]" class="form-control" cols="50" value="<%=row.val2%>" rows="5" size="30"></textarea>
        <textarea name="row[evaluation_summary][<%=index%>][yilunjiaoan]" class="form-control" cols="50" value="<%=row.val3%>" rows="5"></textarea>
        <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
        <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
    </dd>
</script>